﻿<%@ Page Language="C#" MasterPageFile="~/IPMSMasterPage.master" AutoEventWireup="true" CodeFile="SysUsers.aspx.cs" Inherits="SysUsers" Title="Project Monitoring System" Culture="Auto:en-US" UICulture="auto" meta:resourcekey="PageResource1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server" Visible="false"/>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server" >
	<div style="margin-left:10px;margin-right:10px;">
		<asp:Panel ID="panelSearch"  runat="server">
			<fieldset>
				<legend>
					<asp:Label ID="lblSearch" runat="server" Text="Search" meta:resourcekey="lblSearchResource1"/>
				</legend>
				<table>
					<tr>
						<td width="100">
							<asp:Label ID="lblSearchLoginName" Text="Login Name" meta:resourcekey="lblSearchLoginNameResource1" runat="server"/>
						</td>
						<td>
							<asp:TextBox ID="txtSearchLoginName" Width="150px" runat="server"/>
						</td>
						<td width="100">
							<asp:Label ID="lblSearchUserName" Text="User Name" meta:resourcekey="lblSearchUserNameResource1" runat="server"/>
						</td>
						<td>
							<asp:TextBox ID="txtSearchUserName" Width="150px" runat="server"/>
						</td>
						<td width="100">
							<asp:Label ID="lblSearchGroupName" Text="Group Name" meta:resourcekey="lblSearchGroupNameResource1" runat="server"/>
						</td>
						<td>
							<asp:TextBox ID="txtSearchGroupName" Width="150px" runat="server"/>
						</td>
					</tr>
					<tr>
						<td>
							<asp:Label ID="lblUserRole" Text="User Role" runat="server" meta:resourcekey="lblUserRoleResource1"/>
						</td>
						<td>
							<asp:DropDownList ID="lstUserRole" runat="server"/>
						</td>
						<td>
							<asp:Label ID="lblSuspend" Text="Suspend" runat="server" meta:resourcekey="lblSuspendResource1"/>
						</td>
						<td>
							<asp:DropDownList ID="lstSuspend" runat="server"/>
						</td>
						<td colspan="2">
							<asp:Button ID="btnSearch" runat="server" Text="Search" CausesValidation="false" CssClass="submit" meta:resourcekey="btnSearchResource1" onclick="OnClick"/>
							<asp:Button ID="btnNew" runat="server" CausesValidation="False" CssClass="submit" Text="New User" meta:resourcekey="btnNewResource1"  onclick="OnClick" />
						</td>
				   </tr>
				</table>
			</fieldset>
		</asp:Panel>
		<table>
			<tr>
				<td>
					<asp:Label ID="lblError" ForeColor="Red" CssClass="error" runat="server"/>
				</td>
			</tr>
		</table>
		<asp:Panel ID="panelUserList" runat="server" meta:resourcekey="panelUserListResource1">
			<fieldset>
				<legend>
					<asp:Label ID="lblActive" runat="server" Text="Users" meta:resourcekey="lblActiveResource1"></asp:Label>
				</legend>
				<asp:GridView CssClass="Grid" ID="gvUserList" runat="server" 
						BackColor="#DEBA84" 
						BorderColor="#660000"
						BorderStyle="Solid" 
						BorderWidth="1px" 
						CellPadding="0" 
						CellSpacing="0" 
						Width="100%"
						Height="1%" 
						AllowSorting="True" 
						EmptyDataText="No User record(s) available."
						AutoGenerateColumns="False"
						DataKeyNames="Rowno, GroupId" 
						OnRowDataBound="OnRowDataBound"
						OnRowCommand="OnRowCommand">
					<Columns>
						<asp:BoundField DataField="LoginName" HeaderText="Login Name" HeaderStyle-Width="100" ItemStyle-HorizontalAlign="left" ItemStyle-Wrap="false" meta:resourcekey="BoundFieldResource1"/>
						<asp:BoundField DataField="UserName" HeaderText="User Name" ItemStyle-HorizontalAlign="left" ItemStyle-Wrap="false" meta:resourcekey="BoundFieldResource2"/>
						<asp:BoundField DataField="GroupName" HeaderText="User Group" ItemStyle-HorizontalAlign="left" ItemStyle-Wrap="false" meta:resourcekey="BoundFieldResource3"/>
						<asp:BoundField DataField="UserRoleName" HeaderText="User Role Name" ItemStyle-HorizontalAlign="left" ItemStyle-Wrap="false" meta:resourcekey="BoundFieldResource4"/>
						<asp:BoundField DataField="IsSuspend" HeaderText="Suspend?" ItemStyle-HorizontalAlign="left" ItemStyle-Wrap="false" meta:resourcekey="BoundFieldResource5"/>
						<asp:BoundField DataField="LastActivityDate" HeaderText="Last Login Time" HeaderStyle-Width="200" ItemStyle-HorizontalAlign="left" meta:resourcekey="BoundFieldResource6"/>
						<asp:BoundField DataField="UpdateIP" HeaderText="IP Address" ItemStyle-HorizontalAlign="left" meta:resourcekey="BoundFieldResource7"/>
						<asp:BoundField DataField="UpdateBy" HeaderText="Updated By" ItemStyle-HorizontalAlign="left" meta:resourcekey="BoundFieldResource8"/>
						<asp:BoundField DataField="UpdateDate" HeaderText="Last Update Time" HeaderStyle-Width="200" ItemStyle-HorizontalAlign="left" meta:resourcekey="BoundFieldResource9"/>
						<asp:TemplateField ItemStyle-Width="60" ItemStyle-HorizontalAlign="center">
							<ItemTemplate>
								<asp:ImageButton ID="btnEdit" CommandName="Edit" ImageUrl="Images/icon-edit.gif" runat="server"/>
								<asp:ImageButton ID="btnResetPassword" CommandName="ResetPassword" ImageUrl="Images/icon-password.jpg" runat="server"/>
								<asp:ImageButton ID="btnTrash" CommandName="Trash" ImageUrl="Images/icon-trash.gif" runat="server"/>
							</ItemTemplate>
						</asp:TemplateField>
					</Columns>
					<HeaderStyle CssClass="GridHeaderStyle"/>
					<RowStyle CssClass="GridRowStyle" />
					<AlternatingRowStyle CssClass="GridAltRowStyle" />
					<SelectedRowStyle CssClass="GridSelectedRowStyle" />
					<PagerStyle CssClass="GridPagerStyle" ForeColor="White" />
					<FooterStyle CssClass="GridFooterStyle" />
				</asp:GridView>        
			</fieldset>
		</asp:Panel>
	</div>
</asp:Content>
